package com.bw.demo_mvi

import com.bw.demo_mvi.http.Api
import com.bw.demo_mvi.http.BaseResponse
import com.bw.demo_mvi.http.RetrofitManager
import com.bw.demo_mvi.http.VideoEntity
import retrofit2.http.Query

/**
 * @Author : ZhouZiYao
 * @Time : On 2023/11/16 14:47
 * @Description :
 */
class MainRepository {

    private val api: Api by lazy {
        RetrofitManager.instance.createService(Api::class.java)
    }

    suspend fun getVideo(currentPage: Int, pageSize: Int): BaseResponse<MutableList<VideoEntity>>{
        return api.getVideo(currentPage, pageSize)
    }

}